<div class="file-upload-widget">
    <input type="{{ widget.type }}"
           name="{{ widget.name }}"
           {% if widget.value != None %}value="{{ widget.value|stringformat:'s' }}"{% endif %}
           {% include "django/forms/widgets/attrs.html" with widget=widget %}>
    
    {% if files %}
    <script type="application/json" data-files>
        {{ files|safe }}
    </script>
    {% endif %}
</div>
